misc cleanups (#1213)
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Fri, 10 Nov 2023 21:14:56 +0000 (14:14 -0700)
committerGitHub <noreply@github.com>
Fri, 10 Nov 2023 21:14:56 +0000 (14:14 -0700)
initialize garmin_fs class member.
catch gui up with Qt 5.15 floor.
rename tidy build directory.

garmin_fs.h
gui/formatload.cc
gui/main.cc
tools/ci_run_tidy.sh

index ac74e89576ab6fc1213b3a931a77613bea90b6f5..00c16074b875dd7600c46847b9eb5a96d8223d34 100644 (file)
@@ -119,7 +119,7 @@ public:
   QString fax_nr;                              /* fax number */
   QString postal_code; /* postal code */
   QString email;                               /* email address */
-  unsigned int duration; /* expected travel time to next route point, in seconds, only when auto-routed */
+  unsigned int duration{0}; /* expected travel time to next route point, in seconds, only when auto-routed */
 
   QList<garmin_ilink_t> ilinks;
 #ifdef GMSD_EXPERIMENTAL
index 23d24fb39c915f4a7064a4634cbc93aaa21264b9..046e16f121b566f715b8e35ac390dfd08dfd9759 100644 (file)
@@ -34,9 +34,6 @@
 #include <QVariant>                        // for QVariant
 #include <QApplication>                    // for QApplication
 #include <QMessageBox>                     // for QMessageBox
-#ifdef GENERATE_CORE_STRINGS
-#include <QtGlobal>                        // for QT_VERSION, QT_VERSION_CHECK
-#endif
 #include "appname.h"                       // for appName
 
 
@@ -48,11 +45,7 @@ extern QTextStream* generate_output_stream;
 static QString xlt(const QString& f)
 {
 #ifdef GENERATE_CORE_STRINGS
-#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
-  *generate_output_stream << "QT_TRANSLATE_NOOP(\"core\",\"" << f << "\")" << endl;
-#else
   *generate_output_stream << "QT_TRANSLATE_NOOP(\"core\",\"" << f << "\")" << Qt::endl;
-#endif
 #endif
   return QCoreApplication::translate("core", f.toUtf8().constData());
 }
index 60788074e8efc1b56b2611890ace8bbec977c737..6ad489aa8f8855c43dac1af105ef319c8c52e458 100644 (file)
@@ -32,7 +32,7 @@ int main(int argc, char** argv)
 // MIN_QT_VERSION in GPSBabel.pro should correspond to the QT_VERSION_CHECK
 // arguments in main.cc and gui/main.cc and the version check in
 // CMakeLists.txt, gui/CMakeLists.txt.
-#if (QT_VERSION < QT_VERSION_CHECK(5, 12, 0))
+#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
 #error this version of Qt is not supported.
 #endif
 
index 813043835a3bc507c03999ecaf09f33da1aea3c0..6d0eff7e42fa315b9b2df6142a1e55deb7af9715 100755 (executable)
@@ -7,16 +7,16 @@ CODACY_CLANG_TIDY=$(curl -s https://api.github.com/repos/codacy/codacy-clang-tid
 CHECKS="clang-diagnostic-*,clang-analyzer-*,cppcoreguidelines-*,modernize-*,bugprone-*,google-*,misc-*,performance-*,readability-*,-cppcoreguidelines-pro-type-vararg,-modernize-use-trailing-return-type,-readability-identifier-length"
 HEADERFILTER=".*"
 
-mkdir bld
-cd bld
+mkdir bld-tidy
+cd bld-tidy
 cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DGPSBABEL_ENABLE_PCH=OFF -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
 # generate included ui files
 cmake --build .
 cd ..
 
 # exclude third party library source
-jq '[.[]|select(.file|contains("zlib")|not)] | [.[]|select(.file|contains("shapelib")|not)] | [.[]|select(.file|contains("bld")|not)]' \
-bld/compile_commands.json \
+jq '[.[]|select(.file|contains("zlib")|not)] | [.[]|select(.file|contains("shapelib")|not)] | [.[]|select(.file|contains("bld-tidy")|not)]' \
+bld-tidy/compile_commands.json \
 > compile_commands.json
 
 # run-clang-tidy may still be forcing injection of escape sequences for colors.